home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / adikit.arc / INT.LSP < prev    next >
Lisp/Scheme  |  1986-12-01  |  4KB  |  135 lines

  1.  
  2. (defun strippart ()
  3.        (setq part (car parts))
  4.        (setq parts (cdr parts))
  5. )
  6. (defun C:NEXT ()
  7.        (nxt)
  8. )
  9. (defun nxt ()
  10. ; if expecting user answer 
  11.        (if (= "needanswer" switch)
  12.            (progn 
  13.            (strippart)
  14.            (getrslt part)
  15.            (setq switch "answered")
  16.            )
  17.        )
  18. ; get next item from interactive list
  19.        (strippart)
  20.        (if (null part)
  21.            (print "* * * END * * *")        
  22.            (progn
  23. ; if not end of interactive commands list
  24. ; it must be the setup commands... so do them
  25.            (print "Performing setup for interactive test...patience!")
  26.            (mapcar 'command part)
  27. ; then get the test description and start the test
  28.            (strippart)
  29.            (starttest part)
  30. ; then get the command needed in the test and do it
  31.            (strippart)
  32.            (setq switch "needanswer")
  33.            (mapcar 'command part)
  34.            )
  35.        )
  36. )
  37.  
  38. ; INTERACTIVE TESTS:
  39.  
  40. (print "* * * Beginning Interactive tests * * * ")
  41. (print "Note: these tests require your input")
  42. (Print "      ")
  43. (wait 3000)
  44.  
  45. ; check pick box sizes      GETPOINT!!!
  46. (starttest "Check different PICK BOX SIZES")
  47. (setq x (getvar "pickbox"))
  48. (setvar "pickbox" 20)
  49. (userpick)
  50. (setvar "pickbox" 10)
  51. (userpick)  
  52. (setvar "pickbox" x)
  53. (getrslt "Did different PICK BOX SIZES work? ")
  54.  
  55. (if (= "Y" status) 
  56.     (progn 
  57.     ; check Coords ON
  58.     (starttest "Please turn STATUS line Coordinates ON (ctrl D) and MOVE the xhairs")
  59.     (userpick)
  60.     (getrslt "Did COORDS CHANGE in STATUS LINE when you MOVED the crosshairs? ")
  61.  
  62.     ; check coords ft and inches!
  63.     ;  and make sure they don't overflow into menu area
  64.     (starttest "Check FEET and INCHES symbols in Coordinates")
  65.     (command "units" "4" "" "2" "" "" "")
  66.     (userpick)
  67.     (getrslt "Did both the FEET and INCHES symbols appear in STATUS LINE? ")
  68.     ; end the progn and the if
  69.     (command "units" "2" "" "" "" "" "")
  70.     ) )
  71.  
  72. ; check menu boxes if menu   
  73. (if (= "Y" menu)
  74.     (progn
  75.     (starttest "Check if all MENU boxes HIGHLIGHT properly and are PICKABLE")
  76.     (getrslt "Did the MENU boxes HIGHLIGHT properly? ")
  77.     ) 
  78. )
  79.  
  80. ; might as well close out the file as the cancels below are not going   
  81. ; to let too much out to it anyway
  82. (write-line (rtos (getvar "cdate") 2) testf)
  83. (write-line (strcat "end " disp) testf)
  84. (setq testf (close testf))
  85.  
  86. ; setup for the disjointed  NEXT tests.....
  87. (setq parts (list
  88.  
  89.             (list "insert" "*chroma" "0,0" "1" "1" "0" "zoom" "e")
  90.             "After REDRAW starts, please CANCEL it (ctrl c) then type NEXT" 
  91.             (list "redraw")
  92.             "Did CANCEL REDRAW work properly?"
  93.  
  94.             (list "redraw")
  95.             "After REGEN starts, please CANCEL it, then type NEXT"
  96.             (list "REGEN")
  97.             "Did CANCEL REGEN work properly?"
  98.  
  99.             (list "redraw")
  100.             "After ZOOM D, pick a zoom, then type NEXT"
  101.             (list "zoom" "d")
  102.             "Did Zoom D work correctly?"
  103.  
  104.             (list "erase" "l" "" 
  105.                   "insert" "hide" "0,0" "1" "1" "0"
  106.                   "zoom" "e")
  107.             "AFTER Vpoint produces AXES and GLOBE, move them, pick, then NEXT"
  108.             (list "vpoint" "")
  109.             "Did the VPOINT AXES and GLOBE move properly?"
  110.              
  111.             (list "vpoint" "1,2,3")
  112.             "After HIDE starts 'removing hidden lines #', CANCEL it, then NEXT"
  113.             (list "hide")
  114.             "Did CANCEL HIDE work properly?"
  115.              
  116.             (list "vpoint" "0,0,1" 
  117.                   "erase" "w" (getvar "extmin") (getvar "extmax") ""
  118.                   "limits" "0,0" "30,30" 
  119.                   "zoom" "e")
  120.             "After GRID starts, CANCEL it, then type NEXT"
  121.             (list "grid" ".5")
  122.             "Did CANCEL GRID work properly?"
  123.  
  124.             (list "donut" "1" "3" (getvar "viewctr") "")
  125.             "After MOVE starts, make sure DRAG works, then type NEXT"                                           
  126.             (list "move" "l" "" (getvar "viewctr"))
  127.             "Did MOVE and DRAG work correctly?"
  128.                   
  129.             ))
  130.  
  131. (setq switch "")
  132.  
  133. ;do the first test...the user will have to do the rest.
  134. (nxt)
  135.